/**
 * <AiRmob-Framework; A simple augmented reality framework for android >
    Copyright (C) <2012>  <AiRmob Team>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package rendercomponents;

public class Settings {
	/**
	 * de-/activate tracking if deactivated mViewMatrix and mProjectionMatrix
	 * can be altered and mViewMatrix will be set with eye = {-75, 0, 25},
	 * center= {0, 0, 0} and up = {0, 0, 1} until changed
	 */
	public boolean tracking = true;

	/*** rotates all objects in the scene (the scene itself will be rotated) */
	public boolean rotate = false;

	/** use Vertex Buffer Objects (faster) */
	public boolean useVBO = true;

	/**
	 * sort objects by distance. If decideSortingAuto is true the engine will
	 * active sorting by distance as soon as there were two transparent models
	 */
	public boolean decideSortingAuto = false;
	public boolean sortObjectsByDistance = false;

	/** activate picking */
	public boolean activatePicking = true;
	/**
	 * if no object was found under the clicked pixel the renderer will search
	 * in x image-lines around this pixel (0 = just the clicked pixel is tested,
	 * x = x*x pixels will be tested)
	 */
	public int extendedPicking = 100;
	/**
	 * calculates the values for the extendedPicking weighted by distance to the
	 * coordinates
	 */
	public boolean weightedPicking = false;

	/**
	 * Use shadows and therefore draw a depthMapTexture with showShadowMap this
	 * texture will be shown on a fullscreenquad
	 */
	public boolean drawShadowMap = false;
	public boolean showShadowMap = false;
	/**
	 * Choose which of the shadowmaps shall be shown (there is one for every
	 * light, so it needs to be 0 to scene.numLights-1)
	 */
	public int showSMNum = 0;

	/** Show cameraimage as background (on a fullscreenquad) */
	public boolean cameraTex = false;

	/**
	 * measure the FPS - if set to true the real and synchronized FPS will be
	 * printed in system.out as well as the required times for onSurfaceCreated
	 * and onSurfaceChanged
	 */
	public boolean measureFPS = true;

	/**
	 * Number of lights that maximal can be used in a scene, may be 0-8. If
	 * shadows are activated for every light there will be a FBO for its
	 * depthmap
	 * 
	 * If maxLight is bigger than 1 the efficiency will suffer due to more
	 * expansive shaders
	 * 
	 */
	public int maxLights = 1;

	public float[] globalAmbientColor = { 1, 1, 1, 1 };

	/** 1 = Gouraud, 2 = Phong, 3 = Cell-Shading */
	public float lightingMode = 2;
	public boolean useSpotlights = false;
	/** draws models with outline (for toon effects) */
	public boolean drawWithOutline = false;
	public float[] outlineColor = { 1, 0, 0, 1 };
	public float outLineSize = 1.2f;

	/** 0 = No Mapping; 1 = Bump; 2 = Parallax */
	public float mappingMode = 0;

	/** image-postprocessing */
	public boolean postProcessing = false;
	public boolean antiAliasing = false;
	public boolean bloom = false;
	public boolean blur = false;
	/** 0 = simple blur; 1 = Gaussian blur */
	public float blurringMode = 1;
	/** determines the distance for blurring algorithms */
	public float blurRadius = 100;
	/** changes the gauss-function */
	public float sigma = 40;

	// /////////////////////////////////////////
	// All used sourcefiles for shaders
	// /////////////////////////////////////////

	/**
	 * Main-Shaders (used to draw all objects - may need the results from other
	 * shaders and special settings like activated shadowmaps)
	 */

	/** "onelight_main for using just one light */
	public String mainVertexShaderSource = "shader/main.vert";
	public String mainFragmentShaderSource = "shader/main.frag";

	/** Shaders used to draw fullscreenquads */
	public String fullScreenVertexShaderSource = "shader/plaintexture.vert";
	public String fullScreenFragmentShaderSource = "shader/plaintexture.frag";

	/** Shaders used for picking */
	public String pickingVertexShaderSource = "shader/picking.vert";
	public String pickingFragmentShaderSource = "shader/picking.frag";

	/**
	 * Shaders used to create the depth-texture, which itself is used to draw
	 * shadows (one depth-texture per light)
	 */
	public String depthVertexShaderSource = "shader/depthmap.vert";
	public String depthFragmentShaderSource = "shader/depthmap.frag";

	/** Shaders used to draw text */
	public String textVertexShaderSource = "shader/text.vert";
	public String textFragmentShaderSource = "shader/text.frag";

	/** Shaders used to draw Outline */
	public String outlineVertexShaderSource = "shader/text.vert";
	public String outlineFragmentShaderSource = "shader/text.frag";

	/** Shaders used to draw Blur */
	public String blurVertexShaderSource = "shader/blur.vert";
	public String blurFragmentShaderSource = "shader/blur.frag";

	/** Shaders used to draw Bloom */
	public String bloomVertexShaderSource = "shader/text.vert";
	public String bloomFragmentShaderSource = "shader/text.frag";
}
